<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php echo Yii::app()->name;?></title>
<?php $this->util->css($this->css);?>
<!--[if IE]> <link href="<?php echo BASE_URL;?>css/ie.css" rel="stylesheet" type="text/css"> <![endif]-->
<?php $this->util->js($this->head_js);?>
<style type="text/css">
.iconb { 
	font-size: 2em;
}
.widget [class*="icos-"] { float: none; }
</style>
</head>

<body>

<!-- Top line begins -->
<div id="top">
    <div class="wrapper">
        <a href="<?php echo BASE_URL;?>" title="" class="logo"><img src="<?php echo BASE_URL;?>images/logo.png" alt="" /></a>
        
        <?php if (!Yii::app()->user->isGuest):?>
        <!-- Right top nav -->
        <div class="topNav">
            <ul class="userNav">
                <li><a title="" class="search"></a></li>
                <li><a href="<?php echo BASE_URL;?>" title="首页" class="screen"></a></li>
                <li><a href="<?php echo BASE_URL;?>admin/mypass" title="修改密码" class="settings mypass"></a></li>
                <li><a href="<?php echo BASE_URL . 'logout';?>" title="退出" class="logout"></a></li>
                <li class="showTabletP"><a href="#" title="" class="sidebar"></a></li>
            </ul>
            <div class="topSearch">
                <div class="topDropArrow"></div>
                <form action="">
                    <input type="text" placeholder="search..." name="topSearch" />
                    <input type="submit" value="" />
                </form>
            </div>
        </div>
        <?php endif;?>
        <div class="clear"></div>
    </div>
</div>
<!-- Top line ends -->

<?php if (! Yii::app()->user->isGuest):?>
<!-- Sidebar begins -->
<div id="sidebar">
    <div class="mainNav">
        <div class="user">
            <a title="" class="leftUserDrop"><img src="<?php echo BASE_URL;?>images/user.png" alt="" /></a><span><?php echo Yii::app()->user->admin_name;?></span>
            <ul class="leftUser">
                <li><a href="<?php echo BASE_URL;?>admin/mypass" title="修改密码" class="sSettings mypass">修改密码</a></li>
                <li><a href="<?php echo BASE_URL;?>logout" title="退出" class="sLogout">退出</a></li>
            </ul>
        </div>
        
        <!-- 主栏目 -->
        <ul class="nav">
        	<?php foreach ($this->menu['left'] as $item):?>
        	<li><a href="<?php echo $item['url'];?>" <?php echo $item['active'];?>><img src="<?php echo BASE_URL;?>images/icons/mainnav/<?php echo $item['icon'];?>" alt="" /><span><?php echo $item['text'];?></span></a></li>
        	<?php endforeach;?>
        </ul>
    </div>
    
    <!-- Secondary nav -->
    <div class="secNav">
        <div class="secWrapper">
            <div class="secTop">
                <div class="balance">
                    <div class="balInfo"><?php echo Yii::app()->user->role_name;?><span><?php echo date('Y-m-d H:i:s');?></span></div>
                </div>
            </div>
            <ul class="iconsLine ic3 etabs">
				<li><a title=""></a></li>
				<li><a title=""></a></li>
				<li><a title=""></a></li>
			</ul>
            <!-- 二级栏目 -->
            <div id="tab-container" class="tab-container">
                <div id="general">
                    <ul class="subNav">
                    <?php if (isset($this->menu['center'])):?>
                    	<?php foreach ($this->menu['center'] as $item):?>
                    	<li <?php echo $item['active'];?>><a <?php if (isset($item['url'])):?>href="<?php echo $item['url'];?>"<?php endif;?> <?php echo $item['a_active'];?>><span class="icos-fullscreen"></span><?php echo $item['text'];?></a>
						<?php if (!empty($item['items'])):?>
                    		<ul <?php echo $item['ul_hide'];?>>
                    		<?php foreach ($item['items'] as $value):?>
                    			<li><a href="<?php echo $value['url'];?>" <?php echo $value['active'];?>><?php echo $value['text'];?></a></li>
                    		<?php endforeach;?>
                    		</ul>
                    	<?php endif;?>
                    	</li>
                    	<?php endforeach;?>
                    <?php endif;?>
                    </ul>
                    <div class="divider"><span></span></div>
                </div>
            </div>
       </div> 
       <div class="clear"></div>
   </div>
</div>
<!-- Sidebar ends -->
<?php endif;?>

<!-- Content begins -->
<?php if (!Yii::app()->user->isGuest):?>
<div id="content">
    <div class="contentTop">
        <span class="pageTitle"><span class="icon-screen"></span>
        <?php echo $this->menu['common']['title'];?>
        </span>
        <div class="clear"></div>
    </div>
    
    <!-- Breadcrumbs line -->
    <div class="breadLine">
        <div class="bc">
            <ul id="breadcrumbs" class="breadcrumbs">
                <li><a href="<?php echo $this->menu['nav']['index']['url'];?>"><?php echo $this->menu['nav']['index']['text'];?></a></li>
                <?php if ($this->module):?>
                <li><a><?php echo $this->menu['nav']['module'];?></a>
					<ul>
	                <?php foreach ($this->menu['right']['items'] as $item):?>
		        		<li><a href="<?php echo $item['url'];?>"><span class="icos-fullscreen"></span><?php echo $item['text'];?></a></li>
	                <?php endforeach;?>
	                </ul>
				</li>
                <?php endif;?>
                <li><a><?php echo $this->menu['nav']['control'];?></a>
                	<?php if (isset($this->menu['right']['child_items'])):?>
                	<ul>
	                    <?php foreach ($this->menu['right']['child_items'] as $item):?>
	                        <li><a href="<?php echo $item['url'];?>"><span class="icos-fullscreen"></span><?php echo $item['text'];?></a></li>
	                    <?php endforeach;?>
	                </ul>
                    <?php endif;?>
                </li>
                <li class="current"><a href="<?php echo $this->menu['right']['current']['url'];?>" title=""><?php echo $this->menu['right']['current']['text'];?></a></li>
            </ul>
        </div>
    </div>
<?php endif;?>

<?php echo $content;?>
    
<?php if (Yii::app()->user->isGuest):?>
</div>
<?php endif;?>

<div id="TheDialog" class="">hide</div>
<!-- Content ends -->

<?php $this->util->js($this->foot_js);?>
</body>
</html>